package com.zidian.study.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.zidian.student.trucks.R;

/**
 * Created by GongCheng on 2016/10/28 0028.
 */

public class AddQuestionTextAdapter<T> extends TagTextAdapter {
    public AddQuestionTextAdapter(Context context) {
        super(context);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view = LayoutInflater.from(mContext).inflate(R.layout.item_add_question_text_tag, null);

        TextView textView = (TextView) view.findViewById(R.id.tag_tv);
        T t = (T) mDataList.get(position);

        if (t instanceof String) {
            textView.setText((String) t);
        }
        return view;

    }
}
